package com.chudian.controller;

import com.chudian.config.WxPayConfig;
import com.chudian.vo.R;
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.security.PrivateKey;

/**
 * @author : ZhangCheng
 * @date Date : 2022年10月25日
 */
@Api("测试控制器")
@RestController
@RequestMapping("/api/test")
public class TestController {

    @Autowired
    private WxPayConfig wxPayConfig;

    @ApiOperation("获取配置参数")
    @GetMapping("/get-wx-pay-config")
    public R getWxpayConfig(){
        String mchId = wxPayConfig.getMchId();
        return R.ok().data("mchId",mchId);
    }
}
